/** 当路由表太长时，可以将其拆分为小模块 **/

import Layout from 'views/layout/layout'

const marketPromotionRouter = {
  path: '/marketPromotion',
  component: Layout,
  redirect: 'noredirect',
  name: 'marketPromotion',
  meta: {
    title: 'marketPromotion',
    icon: 'marketPromotion',
    roles: ['demo']
  },
  children: [
    {
      path: 'promotionManage',
      component: () => import('pages/marketPromotion/promotionManage/index'),
      redirect: 'noredirect',
      name: 'promotionManage',
      meta: {
        title: 'promotionManage'
      },
      children: [
        {
          path: 'limitedPurchaseApplication',
          component: () => import('pages/marketPromotion/promotionManage/limitedPurchaseApplication'),
          name: 'limitedPurchaseApplication',
          meta: {
            title: 'limitedPurchaseApplication'
          }
        },
        {
          path: 'presaleOnShelfApplication',
          component: () => import('pages/marketPromotion/promotionManage/presaleOnShelfApplication'),
          name: 'presaleOnShelfApplication',
          meta: {
            title: 'presaleOnShelfApplication'
          }
        },
        {
          path: 'preferentialPackages',
          component: () => import('pages/marketPromotion/promotionManage/preferentialPackages'),
          name: 'preferentialPackages',
          meta: {
            title: 'preferentialPackages'
          }
        }
      ]
    },
    {
      path: 'mallCoupons',
      component: () => import('pages/marketPromotion/mallCoupons/index'),
      redirect: 'noredirect',
      name: 'mallCoupons',
      meta: {
        title: 'mallCoupons'
      },
      children: [
        {
          path: 'supplierCoupons',
          component: () => import('pages/marketPromotion/mallCoupons/supplierCoupons'),
          name: 'supplierCoupons',
          meta: {
            title: 'supplierCoupons'
          }
        },
        {
          path: 'sendCouponsToCustomers',
          component: () => import('pages/marketPromotion/mallCoupons/sendCouponsToCustomers'),
          name: 'sendCouponsToCustomers',
          meta: {
            title: 'sendCouponsToCustomers'
          }
        },
        {
          path: 'couponBaseData',
          component: () => import('pages/marketPromotion/mallCoupons/couponBaseData'),
          name: 'couponBaseData',
          meta: {
            title: 'couponBaseData'
          }
        },
        {
          path: 'couponPackagesRelease',
          component: () => import('pages/marketPromotion/mallCoupons/couponPackagesRelease'),
          name: 'couponPackagesRelease',
          meta: {
            title: 'couponPackagesRelease'
          }
        }
      ]
    },
    {
      path: 'fullGiftPromotion',
      component: () => import('pages/marketPromotion/fullGiftPromotion/index'),
      redirect: 'noredirect',
      name: 'fullGiftPromotion',
      meta: {
        title: 'fullGiftPromotion'
      },
      children: [
        {
          path: 'fullGiftApplication',
          component: () => import('pages/marketPromotion/fullGiftPromotion/fullGiftApplication'),
          name: 'fullGiftApplication',
          meta: {
            title: 'fullGiftApplication'
          }
        },
        {
          path: 'giftLibrary',
          component: () => import('pages/marketPromotion/fullGiftPromotion/giftLibrary'),
          name: 'giftLibrary',
          meta: {
            title: 'giftLibrary'
          }
        }
      ]
    },
    {
      path: 'freeExpressForEnough',
      component: () => import('pages/marketPromotion/freeExpressForEnough/index'),
      redirect: 'noredirect',
      name: 'freeExpressForEnough',
      meta: {
        title: 'freeExpressForEnough'
      },
      children: [
        {
          path: 'freeExpressForEnoughRelease',
          component: () => import('pages/marketPromotion/freeExpressForEnough/freeExpressForEnoughRelease'),
          name: 'freeExpressForEnoughRelease',
          meta: {
            title: 'freeExpressForEnoughRelease'
          }
        }
      ]
    }
  ]
}

export default marketPromotionRouter